package com.cookiesoft.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cookiesoft.order.mapper.ZhenPaymentdetailsMapper;
import com.cookiesoft.order.domain.ZhenPaymentdetails;
import com.cookiesoft.order.service.IZhenPaymentdetailsService;

/**
 * 支付详情，存储订单支付信息Service业务层处理
 *
 * @author anc
 * @date 2024-11-06
 */
@Service
public class ZhenPaymentdetailsServiceImpl implements IZhenPaymentdetailsService {
    @Autowired
    private ZhenPaymentdetailsMapper zhenPaymentdetailsMapper;

    /**
     * 查询支付详情，存储订单支付信息
     *
     * @param paymentId 支付详情，存储订单支付信息主键
     * @return 支付详情，存储订单支付信息
     */
    @Override
    public ZhenPaymentdetails selectZhenPaymentdetailsByPaymentId(Long paymentId) {
        return zhenPaymentdetailsMapper.selectZhenPaymentdetailsByPaymentId(paymentId);
    }

    /**
     * 查询支付详情，存储订单支付信息列表
     *
     * @param zhenPaymentdetails 支付详情，存储订单支付信息
     * @return 支付详情，存储订单支付信息
     */
    @Override
    public List<ZhenPaymentdetails> selectZhenPaymentdetailsList(ZhenPaymentdetails zhenPaymentdetails) {
        return zhenPaymentdetailsMapper.selectZhenPaymentdetailsList(zhenPaymentdetails);
    }

    /**
     * 新增支付详情，存储订单支付信息
     *
     * @param zhenPaymentdetails 支付详情，存储订单支付信息
     * @return 结果
     */
    @Override
    public int insertZhenPaymentdetails(ZhenPaymentdetails zhenPaymentdetails) {
            return zhenPaymentdetailsMapper.insertZhenPaymentdetails(zhenPaymentdetails);
    }

    /**
     * 修改支付详情，存储订单支付信息
     *
     * @param zhenPaymentdetails 支付详情，存储订单支付信息
     * @return 结果
     */
    @Override
    public int updateZhenPaymentdetails(ZhenPaymentdetails zhenPaymentdetails) {
        return zhenPaymentdetailsMapper.updateZhenPaymentdetails(zhenPaymentdetails);
    }

    /**
     * 批量删除支付详情，存储订单支付信息
     *
     * @param paymentIds 需要删除的支付详情，存储订单支付信息主键
     * @return 结果
     */
    @Override
    public int deleteZhenPaymentdetailsByPaymentIds(Long[] paymentIds) {
        return zhenPaymentdetailsMapper.deleteZhenPaymentdetailsByPaymentIds(paymentIds);
    }

    /**
     * 删除支付详情，存储订单支付信息信息
     *
     * @param paymentId 支付详情，存储订单支付信息主键
     * @return 结果
     */
    @Override
    public int deleteZhenPaymentdetailsByPaymentId(Long paymentId) {
        return zhenPaymentdetailsMapper.deleteZhenPaymentdetailsByPaymentId(paymentId);
    }
}
